home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-07-13 | 838 b | 45 lines | [TEXT/CWIE] |
- //Copyright (c) 1997 Aidan Cully
- //All rights reserved
-
- #include "CLBaseWindow.h"
- #include "CLGrowBox.h"
-
- TGrowBox::TGrowBox( TLayoutBranch *super ):
- TWindowDrawer( super )
- {
- }
-
- void TGrowBox::DrawWindowSelf( TBaseWindow *gr )
- {
- WindowRef window= gr->GetWindow();
- GrafPtr oldPort;
- ::GetPort( &oldPort );
- ::SetPort( window );
- RgnHandle tRgn;
- tRgn= ::NewRgn();
- ::GetClip( tRgn );
- ::ClipRect( &GetLocalRect() );
- ::DrawGrowIcon( window );
- ::SetClip( tRgn );
- ::SetPort( oldPort );
- ::DisposeRgn( tRgn );
- }
-
- Rect TGrowBox::GetLargestSize()
- {
- Rect ret;
- ::SetRect( &ret, 0, 0, 16, 16 );
- return( ret );
- }
-
- Boolean TGrowBox::MakeActive( Boolean active )
- {
- DrawWindow( mWindow );
- return( true );
- }
-
- void TGrowBox::HandleMouse( TMouseButtonEvent *ev )
- {
- WindowRef win;
- mWindow->DoMouseDown( ::FindWindow( ev->where, &win ), ev );
- }